﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;

namespace FCA.Common
{
    public class ConfigurationHelper
    {
        #region 私有变量
        private static string _HWCOMMRead;
        private static string _HWCOMMWrite;

        private static string _TempChryslerFACAppWrite;
        private static string _TempChryslerFACAppRead;
        #endregion
        #region 构造函数
        /// <summary>
        /// 构造函数
        /// </summary>
        static ConfigurationHelper()
        {
            if (ConfigurationManager.ConnectionStrings["FCAuserWrite"] != null)
            {
                _HWCOMMWrite = ConfigurationManager.ConnectionStrings["FCAuserWrite"].ConnectionString;
            }
            if (ConfigurationManager.ConnectionStrings["FCAuserRead"] != null)
            {
                _HWCOMMRead = ConfigurationManager.ConnectionStrings["FCAuserRead"].ConnectionString;
            }


            if (ConfigurationManager.ConnectionStrings["TempChryslerFACAppWrite"] != null)
            {
                _TempChryslerFACAppWrite = ConfigurationManager.ConnectionStrings["TempChryslerFACAppWrite"].ConnectionString;
            }
            if (ConfigurationManager.ConnectionStrings["TempChryslerFACAppRead"] != null)
            {
                _TempChryslerFACAppRead = ConfigurationManager.ConnectionStrings["TempChryslerFACAppRead"].ConnectionString;
            }
        }
        #endregion

        public static string FCAuserRead
        {
            get { return _HWCOMMRead; }
        }
        public static string FCAuserWrite
        {
            get { return _HWCOMMWrite; }
        }

        public static string TempChryslerFACAppWrite
        {
            get { return _TempChryslerFACAppWrite; }
        }

        public static string TempChryslerFACAppRead
        {
            get { return _TempChryslerFACAppRead; }
        }
    }
}
